set -g prefix ^a
set -g status-keys vi
setw -g mode-keys vi

unbind c
unbind i
unbind l
unbind s
unbind w
unbind [
unbind p
unbind Tab

bind F12 source-file ~/.tmux.conf
bind w neww
bind m choose-window
bind a choose-session
bind c kill-pane
bind t set status
bind Escape copy-mode
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' begin-selection


bind -n ^F1 select-window -t 1
bind -n ^F2 select-window -t 2
bind -n ^F3 select-window -t 3
bind -n ^F4 select-window -t 4
bind -n ^F5 select-window -t 5
bind -n ^F6 select-window -t 6
bind -n ^F7 select-window -t 7
bind -n ^F8 select-window -t 8
bind -n ^F9 select-window -t 9
bind -n ^F10 select-window -t 10
bind -n ^F11 select-window -t 11
bind -n ^F12 select-window -t 12

bind-key M-Tab set-option -g status

bind ^h select-pane -L
bind ^j select-pane -D
bind ^k select-pane -U
bind ^l select-pane -R

bind h resize-pane -L
bind j resize-pane -D
bind k resize-pane -U
bind l resize-pane -R

bind F1 select-pane -t 1
bind F2 select-pane -t 2
bind F3 select-pane -t 3
bind F4 select-pane -t 4
bind F5 select-pane -t 5
bind F6 select-pane -t 6
bind F7 select-pane -t 7
bind F8 select-pane -t 8
bind F9 select-pane -t 9
bind F10 select-pane -t 10
bind F11 select-pane -t 11
# bind F12 select-pane -t 12

bind i split-window -h
bind s split-window

# Start counting at 1
set -g base-index 1

set -g pane-border-fg black
set -g pane-active-border-fg colour101
set -g display-panes-colour colour8
set -g display-panes-active-colour colour101
set -g display-panes-time 1000
set -g mouse on

setw -g automatic-rename on
setw -g monitor-activity on
setw -g utf8 on


set -g default-shell /bin/zsh
set -g default-command /bin/zsh
set -g set-titles on
set -g set-titles-string 'tmux: #T'
set -g repeat-time 100
set -g default-terminal "screen-256color"
setw -g clock-mode-colour red
setw -g clock-mode-style 12
setw -g alternate-screen on

# Don't close windows
set -g set-remain-on-exit off

setw -g mode-keys vi
set -g status-utf8 on
set -g status-bg default
set -g status-fg default
set -g status-left-length 100
set -g status-left " #[fg=default]#W#[fg=red] >> #[fg=white]#(cat /proc/loadavg | cut -c 1-14) #[fg=red]>> #[fg=white]%d/%m %H:%M  "
set -g status-right-length 0
set -g status-right ""
set -g status-justify right
setw -g window-status-format '#[fg=white]#I#[fg=black]#W'
setw -g window-status-current-format '#[fg=black]#I#[fg=magenta]#W'
set-window-option -g window-status-current-fg red
set-option -g lock-after-time 300
set-option -g lock-command vlock

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'

set -g @sidebar-tree-command 'tree -C'
set -g @sidebar-tree-position 'right'

run '~/.tmux/plugins/tpm/tpm'

